import { ref } from 'vue'
import PageContent from '@/components/page-content'
export function usePageSearch() {
  //拿到PageContent组件的实列
  const pageContentRef = ref<InstanceType<typeof PageContent>>()
  //搜索
  const handleSearchClick = (value: any) => {
    pageContentRef.value?.getPageData(value._value)
  }
  //重置
  const handleResetClick = () => {
    pageContentRef.value?.getPageData()
  }
  return [pageContentRef, handleSearchClick, handleResetClick]
}
